package com.sqy.controller.collection;

import com.sqy.entity.Icons;
import com.sqy.entity.collection.HomeCollection;
import com.sqy.service.collection.HomeCollectionService;
import com.sqy.utlis.ApiResult;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/HomeController")
@Api(tags = "首页板块数据")
public class HomeController {

    @Autowired
    HomeCollectionService  homeCollectionService;

    @GetMapping("/list")
    public ApiResult  getHomeCollection(@RequestParam("id") Integer id){
        HomeCollection homeCollectionList = homeCollectionService.getHomeCollectionList(id);

        return  ApiResult.success(homeCollectionList);
    }
}
